<?php


namespace app\pc\controller;


use app\api\model\Account;
use think\facade\View;

class Index
{
    public function add()
    {
        return View::fetch();
    }

    public function account()
    {
        return View::fetch();
    }

    public function edit()
    {
        $accountId = input('get.account_id');
        if (empty($accountId)) return 'ID不能为空~';
        $accountModel = new Account();
        $data = $accountModel->where('account_id', '=', $accountId)->find();
        if (empty($data)) return '用户不存在，无法编辑~';
        View::assign('data', $data);
        return View::fetch();
    }
}
